home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 February / Macworld (1999-02).dmg / Games World / SharewareGames / Xconq 7.2.2 / lib / beirut.g < prev    next >
Text File  |  1998-05-22  |  8KB  |  353 lines

  1. (game-module "beirut"
  2.   (title "Beirut 1982")
  3.   (blurb "The heroic fighters of Beirut")
  4.   (variants
  5.    (see-all false)
  6.    )
  7.   )
  8.  
  9. ; death squads shouldn't retreat
  10. ; no capturing of leader if they are win/lose condition.
  11.  
  12. (unit-type militia (image-name "soldiers")
  13.   (help "hide and fight from building to building"))
  14. (unit-type |death squad| (image-name "45")
  15.   (help "used for assassinating leaders"))
  16. (unit-type leader (image-name "man") (char "L")
  17.   (help "an individual, one for each side"))
  18. (unit-type |car bomb| (image-name "auto") (char "C")
  19.   (help "destroys buildings and all else in the vicinity"))
  20. (unit-type tank (image-name "tank") (char "T")
  21.   (help "also destroys buildings and other things"))
  22. (unit-type wreckage (image-name "city20-wrecked") (char "W")
  23.   (possible-sides "independent")
  24.   (help "a disaster, but still OK for hiding out"))
  25. (unit-type building (image-name "city20") (char "B")
  26.   (help "good for hiding out"))
  27.  
  28. (terrain-type sea (char "."))
  29. (terrain-type beach (image-name "desert") (char ","))
  30. (terrain-type street (image-name "road") (char "+"))
  31. (terrain-type junkheap (image-name "brown") (char "^"))
  32. (terrain-type fields (image-name "green") (char "="))
  33. (terrain-type trees (image-name "forest") (char "%"))
  34.  
  35. (add sea liquid true)
  36.  
  37. (define m militia)
  38. (define d |death squad|)
  39. (define L leader)
  40. (define C |car bomb|)
  41. (define T tank)
  42. (define W wreckage)
  43. (define B building)
  44.  
  45. (define movers ( m d L C T ))
  46. (define walkers ( m d L ))
  47. (define vehicles ( C T ))
  48. (define water ( sea ))
  49. (define land ( beach street junkheap fields trees ))
  50.  
  51. ;;; Static relationships.
  52.  
  53. ;;; Unit-unit capacities.
  54.  
  55. (add (W B) capacity (1 2))
  56.  
  57. (table unit-size-as-occupant
  58.   (u* u* 99)
  59.   (walkers (W B) 1)
  60.   )
  61.  
  62. ;;; Unit-terrain capacities.
  63.  
  64. (add t* capacity 4)
  65.  
  66. (table unit-size-in-terrain
  67.   (u* t* 1)
  68.   ((W B) t* 4)
  69.   )
  70.  
  71. ;;; Vision.
  72.  
  73. (add u* vision-range 4)
  74. ;; Tanks have optics to see further.
  75. (add T vision-range 8)
  76.  
  77. (table visibility
  78.   ;; Death squads are sneaky.
  79.   (d t* 0)
  80.   ;; Leaders are well-known, so can't hide in crowds on the street,
  81.   ;; but can take cover in some kinds of terrain.
  82.   (L (junkheap trees) 0)
  83.   )
  84.  
  85. (add u* vision-bend 0)
  86.  
  87. (table eye-height
  88.   ;; Everybody can at least stand up to look around.
  89.   (u* t* 2)
  90.   ;; One can stand on top of a tank to see further.
  91.   (T t* 4)
  92.   ;; Buildings are multi-story, offer good viewing.
  93.   (B t* 15)
  94.   )
  95.  
  96. (add junkheap thickness 10)
  97. (add trees thickness 8)
  98.  
  99. (add (W B) see-always true)
  100.  
  101. (set terrain-seen true)
  102.  
  103. ;;; Actions.
  104.  
  105. ;                          m d L C T
  106. (add movers acp-per-turn ( 2 4 4 6 6 ))
  107.  
  108. ;;; Movement.
  109.  
  110. (add (W B) speed 0)
  111.  
  112. (table mp-to-enter-terrain
  113.   (u* t* 99)
  114.   (walkers land 1)
  115.   (vehicles ( beach street ) 1)
  116.   ;; Tanks can go cross-country.
  117.   (T fields 1)
  118.   )
  119.  
  120. (table can-enter-independent
  121.   ;; Anybody on foot can duck into buildings or wreckage.
  122.   (walkers (W B) true)
  123.   ;; ...but militia will always want to take and keep it.
  124.   (m B false)
  125.   )
  126.  
  127. ;;; Combat.
  128.  
  129. ;                m d L C T W  B
  130. (add u* hp-max ( 9 1 1 1 2 1 10))
  131.  
  132. (table hit-chance
  133.   ;        m  d  L  C  T  W  B
  134.   (m u* ( 50 50 50 50 30  0 50 ))
  135.   (d u* (  5 50 70 20 10  0  0 ))
  136.   (L u* (  0 20 50 10 10  0  0 ))
  137.   (C u* ( 20 50 90 90 10  0 10 ))
  138.   (T u* ( 90 90 90 90 90  0 90 ))
  139.   (W u* 0)
  140.   (B u* ( 10 10 10 10  0  0  0 ))
  141.   )
  142.  
  143. (table damage
  144.   (u* u* 1)
  145.   (u* W 0)
  146.   (T m 2d2+1)
  147.   (W u* 0)
  148.   )
  149.  
  150. (add T acp-to-fire 1)
  151.  
  152. (add T range 8)
  153.  
  154. (add T fire-angle-max 10)
  155.  
  156. (table weapon-height
  157.   (u* t* 0)
  158.   (T t* 2)
  159.   )
  160.  
  161. (table body-height
  162.   (u* t* 2)
  163.   )
  164.  
  165. (table capture-chance
  166.   (m ( C T B ) ( 80 50 90 ))
  167.   )
  168.  
  169. (table withdraw-chance-per-attack
  170.   (u* m 20)
  171.   (u* d 80)
  172.   (u* L 95)
  173.   (u* C 50)
  174.   (u* T 25)
  175.   )
  176.  
  177. (table protection
  178.   ((W B) ( m d ) 50)
  179.   (m B 10)
  180.   )
  181.  
  182. (add B wrecked-type W)
  183.  
  184. ;; Car bombs do their work by detonation.
  185.  
  186. (add C acp-to-detonate 1)
  187.  
  188. (add C hp-per-detonation 1)
  189.  
  190. (table detonation-unit-range
  191.   (C u* 2)
  192.   )
  193.  
  194. (table detonation-damage-at
  195.   (C u* 10)
  196.   (C W 0)
  197.   )
  198.  
  199. (table detonation-damage-adjacent
  200.   (C u* 8)
  201.   (C T 1)
  202.   (C W 0)
  203.   )
  204.  
  205. (table detonate-on-hit
  206.   ;       m  d  L   C   T   W   B
  207.   (C u* (50 50 50 100 100 100 100))
  208.   )
  209.  
  210. (table detonate-on-capture
  211.   ;; Car bombs often have booby traps in them.
  212.   (C u* 30)
  213.   )
  214.  
  215. (table detonation-accident-chance
  216.   ;; Car bombs are dangerous to handle.
  217.   (C t* 4)
  218.   )
  219.  
  220. ;;; Random events.
  221.  
  222. (add B revolt-chance 50)
  223.  
  224. ;; Buildings may surrender to nearby units, including
  225. ;; other buildings.
  226.  
  227. (table surrender-chance
  228.   ((m L T B) B (10.00 10.00 20.00 5.00))
  229.   )
  230.  
  231. (table surrender-range
  232.   (u* u* 1)
  233.   )
  234.  
  235. ;;; Scoring.
  236.  
  237. (scorekeeper (do last-side-wins))
  238.  
  239. (add L point-value 25)
  240. (add B point-value 1)
  241.  
  242. ;;; Setup.
  243.  
  244. ;                   m d L C T W B
  245. (add u* start-with (6 2 1 5 2 0 5))
  246.  
  247. (table independent-density (B junkheap 9000))
  248.  
  249. (table favored-terrain
  250.   (u* t* 0)
  251.   (movers street 100)
  252.   (B junkheap 100)
  253.   )
  254.  
  255. (set country-radius-min 4)
  256. (set country-separation-min 6)
  257. (set country-separation-max 12)
  258.  
  259. (add street country-terrain-min 15)
  260. (add junkheap country-terrain-min 1)
  261.  
  262. ;; Don't let this go on forever.
  263.  
  264. (set last-turn 200)
  265.  
  266. (side 1 (noun "Maronite")
  267.   )
  268. (side 2 (plural-noun "Amal")
  269.   )
  270. (side 3 (name "Hezbollah")
  271.   )
  272. (side 4 (noun "Druze") (plural-noun "Druze")
  273.   )
  274. (side 5 (noun "Syrian") (emblem-name "flag-syria")
  275.   )
  276. (side 6 (noun "Israeli") (emblem-name "flag-israel")
  277.   )
  278. (side 7 (adjective "PLO")
  279.   )
  280.  
  281. (set sides-min 7)
  282. (set sides-max 7)
  283.  
  284. (world 100000)
  285.  
  286. (area 72 42 (cell-width 50))
  287.  
  288. (area (terrain
  289.   (by-name
  290.     (sea 0) (beach 1) (street 2) (junkheap 3) (fields 4)
  291.     (trees 5))
  292.   "72a"
  293.   "72a"
  294.   "72a"
  295.   "15ab3d6b4a2bc2dc2dbd4bc2dc2dc4bc17a"
  296.   "9abc5bc4d2c2dc2d4c2dc2dc2dc2dc2dc2dc2dc2dc16a"
  297.   "8a2b3c3dc2d3cd6c3d6c3d16c15a"
  298.   "7ab2dc2dc2d4cdc3dc2dc3dedc2dcd3cdc2dc2dc2dc2dcdc14a"
  299.   "7ab2dc2d2cdc2dc2dc2dc2dc3dedc2dcdc3dc2dc2dc2dcdfc2dc13a"
  300.   "7ab3c2dcd2c2d14ce10c2d11cd2c12a"
  301.   "7ab2dc2dc2dc2dc2dcdc3dcf2c2df2dc2dc2dc2dc2dc2dc2dcd2cde11a"
  302.   "7ab3d10cdc2dc2dc2dc2de2dc2dc2dc2dc2dc3dcdc2dcdfe10a"
  303.   "8ab3c3dc3dcd5c2d7cf7cd8cdc2d4cf2e9a"
  304.   "8ab3dc2dc3dc2dc2dc2dc2dc2dcfdcdc3dc2dcdc3d2c4dcdcd2e8a"
  305.   "9a4dcd5c2dc2d4c2dc2dcfdc2dc2dc2dc2dc2dc2dc2dcfd4e7a"
  306.   "9ab2cd4c2d7c2d8cd2c2dcd6cd11cefefc6a"
  307.   "10abd2c2dc2dc2dcd2c2dc2dc2dc2dedcdcdc5dc5dc2dcfdcde2ce5a"
  308.   "10abdcd3c2dc2dc2dc2dc2dc2dc2de2d2cdc2dc2dc2df2dc2dc2dcefcfde4a"
  309.   "11abcdcd14c2d6cedcd11cd3cd4c2ecf3e3a"
  310.   "11abd2cdc2dc2dcdc3dcd4c3dcdec2dc2dc2dc2dcdc2d2c2dcdecd4e2a"
  311.   "12abdc2dcdc2dc2dc2dc5dc2dcdfc2dc2dc3dcdc2dc2dc2dc2dcf2ef2ea"
  312.   "13ab16c4d6cf8c2d14c3efefe"
  313.   "13adcdc2dc2dc2dcdc2dc2d2cdc3df2dc2dc2dc2dc2dc2dcdcdfdcdf2ef2e"
  314.   "14adcdcdc2dcd2c2dc2dcdc2dc3dc2dc3dcdc2dcd2c2dc2dc2dc7e"
  315.   "15abcd4c2dcd16ce3cdc2d3cdc2d8cd2fef2e"
  316.   "16adcdc2dcdc3dc2dcdc3dc2dc2de2dc2dc2dc2dc2dcdc3dcdf5e"
  317.   "17ab2c2dc2dc3dcdc2dc2dc2dc3dedc2d2cfc2dcd2c2dc2dcd3ef2e"
  318.   "18ab13c2d4c2d10cd7cdcdcd4c5e"
  319.   "19a3dc2dc5dc2dcdc3dc2dcdec2dc5dc2dc2dc2dc2dcfd2e"
  320.   "20a2dc3d2c3dcd2c2dc2dc2dcdfc2dc2dc2dcd2c2dc2dc2d3cfe"
  321.   "22ad2b2cd2cd3c3d8cf10cdcdcd7cfece"
  322.   "25a2b3d2c2d2cdcdc3dcd2c2dc2dc2dcdc2d2c2dc2dcd2ec"
  323.   "27a2b2dc2dcd2c2dc3dcdcedc2dc2dcdc3dc2dc2dc2def"
  324.   "30a3cdc2d8cd2cf4c2dc2d2cd10ce"
  325.   "31abd2c2dc2dc5dc2df2dc3dc3d2c2dc2dc2dce"
  326.   "32abdc3dcdc5dc2dc2dc2d3c3dc2dc2dc3dc"
  327.   "34a7c2d2cd4cf5c2d14c"
  328.   "35a2dc2dc2dcd2cd2cdfc2dc2dc5dc2dc3dc"
  329.   "36adc2dc2dcdcdcdc2de2dc2dc5dc2dc3dc"
  330.   "37ab8c2d4ce14cd4c"
  331.   "37ab2dc2dc2dc2dc2dcedc2dc2dc2dc2dc3dc"
  332.   "38a2dc2dc2dc2dc2dc2dc2dc2dc2dc2dc3dc"
  333.   "38a34c"
  334. ))
  335.  
  336. ;;; Documentation.
  337.  
  338. (game-module (instructions (
  339.   "Take control of the city and eliminate your rival factions."
  340.   ""
  341.   "Try not to destroy too much of the city in the process."
  342.   )))
  343.  
  344. (game-module (design-notes (
  345.   "Actually, this includes only a subset of the actual participants.
  346.   They all fight each other here; there should actually be some alliances."
  347.   )))
  348.  
  349. (game-module (notes (
  350.   "Relive the heroic struggles of the heroic factions fighting for"
  351.   "the just and righteous cause of control of Beirut."
  352.   )))
  353.